package cemp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * @TableName stock_kpi_cfg
 */
@Data
@TableName(value ="stock_kpi_cfg")
public class StockKpiCfg implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    private String kpiCode;

    private String kpiType;

    private String kpiDesc;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getKpiCode() {
        return kpiCode;
    }

    public void setKpiCode(String kpiCode) {
        this.kpiCode = kpiCode;
    }

    public String getKpiType() {
        return kpiType;
    }

    public void setKpiType(String kpiType) {
        this.kpiType = kpiType;
    }

    public String getKpiDesc() {
        return kpiDesc;
    }

    public void setKpiDesc(String kpiDesc) {
        this.kpiDesc = kpiDesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StockKpiCfg other = (StockKpiCfg) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getKpiCode() == null ? other.getKpiCode() == null : this.getKpiCode().equals(other.getKpiCode()))
            && (this.getKpiType() == null ? other.getKpiType() == null : this.getKpiType().equals(other.getKpiType()))
            && (this.getKpiDesc() == null ? other.getKpiDesc() == null : this.getKpiDesc().equals(other.getKpiDesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getKpiCode() == null) ? 0 : getKpiCode().hashCode());
        result = prime * result + ((getKpiType() == null) ? 0 : getKpiType().hashCode());
        result = prime * result + ((getKpiDesc() == null) ? 0 : getKpiDesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", kpiCode=").append(kpiCode);
        sb.append(", kpiType=").append(kpiType);
        sb.append(", kpiDesc=").append(kpiDesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
